
(function() {
	jQuery.extend({

		MessageBox : {
			box:undefined,
			create: function(){
				if(!this.box){
					this.box = $("<div class='messageBox'>");
					this.box.append("<div class='back'>");
					var context = $("<div class='cont'>");
					this.box.append(context);
					$(document.body).append(this.box);
				}else{
					return this.box.find(".cont");
				}
				return context;
			},
			info : function(str,delay) {
				var context = this.create();
				var zhis = this.box;
				context.html(str);
				delay = (delay==undefined||isNaN(delay))?500:delay;
				
				zhis.fadeIn(1000, function() {
					if(delay>0){
						zhis.delay(delay).fadeOut(1500);
					}
				});
			}

		}

	});
})(jQuery);
